package com.jk.controller;

import com.jk.bean.Bks;
import com.jk.service.BksService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@RequestMapping("bks")
@Controller
public class BksController {
    @Resource
    private BksService bksService;
    @RequestMapping("selectBks")
    @ResponseBody
    public List<Bks> selectBks(){

        return   bksService.selectBks();
    }
    @ResponseBody
    @RequestMapping("addBks")
    public String addBks(Bks bks){
        bksService.addBks(bks);
        return  "1";
    }
}
